.class public Lcom/instagram/android/mediacache/a;
.super Landroid/graphics/drawable/Drawable;
.source "CircularDrawable.java"


# instance fields
.field private final a:Landroid/graphics/BitmapShader;

.field private final b:Landroid/graphics/Paint;

.field private final c:Landroid/graphics/RectF;

.field private d:I

.field private e:I


# direct methods
.method public constructor <init>(Landroid/graphics/Bitmap;II)V
    .locals 3
    .parameter
    .parameter
    .parameter

    .prologue
    .line 17
    invoke-direct {p0}, Landroid/graphics/drawable/Drawable;-><init>()V

    .line 18
    iput p2, p0, Lcom/instagram/android/mediacache/a;->d:I

    .line 19
    iput p3, p0, Lcom/instagram/android/mediacache/a;->e:I

    .line 21
    new-instance v0, Landroid/graphics/BitmapShader;

    sget-object v1, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;

    sget-object v2, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;

    invoke-direct {v0, p1, v1, v2}, Landroid/graphics/BitmapShader;-><init>(Landroid/graphics/Bitmap;Landroid/graphics/Shader$TileMode;Landroid/graphics/Shader$TileMode;)V

    iput-object v0, p0, Lcom/instagram/android/mediacache/a;->a:Landroid/graphics/BitmapShader;

    .line 22
    invoke-static {p1, p2, p3}, Lcom/instagram/n/a/a;->a(Landroid/graphics/Bitmap;II)Landroid/graphics/Matrix;

    move-result-object v0

    .line 23
    iget-object v1, p0, Lcom/instagram/android/mediacache/a;->a:Landroid/graphics/BitmapShader;

    invoke-virtual {v1, v0}, Landroid/graphics/BitmapShader;->setLocalMatrix(Landroid/graphics/Matrix;)V

    .line 24
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/mediacache/a;->c:Landroid/graphics/RectF;

    .line 25
    new-instance v0, Landroid/graphics/Paint;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v0, p0, Lcom/instagram/android/mediacache/a;->b:Landroid/graphics/Paint;

    .line 26
    iget-object v0, p0, Lcom/instagram/android/mediacache/a;->b:Landroid/graphics/Paint;

    iget-object v1, p0, Lcom/instagram/android/mediacache/a;->a:Landroid/graphics/BitmapShader;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;

    .line 27
    return-void
.end method


# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
    .locals 2
    .parameter "canvas"

    .prologue
    .line 46
    iget-object v0, p0, Lcom/instagram/android/mediacache/a;->c:Landroid/graphics/RectF;

    iget-object v1, p0, Lcom/instagram/android/mediacache/a;->b:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawOval(Landroid/graphics/RectF;Landroid/graphics/Paint;)V

    .line 47
    return-void
.end method

.method public getIntrinsicHeight()I
    .locals 1

    .prologue
    .line 41
    iget v0, p0, Lcom/instagram/android/mediacache/a;->e:I

    return v0
.end method

.method public getIntrinsicWidth()I
    .locals 1

    .prologue
    .line 36
    iget v0, p0, Lcom/instagram/android/mediacache/a;->d:I

    return v0
.end method

.method public getOpacity()I
    .locals 1

    .prologue
    .line 61
    const/4 v0, -0x3

    return v0
.end method

.method protected onBoundsChange(Landroid/graphics/Rect;)V
    .locals 1
    .parameter "bounds"

    .prologue
    .line 31
    iget-object v0, p0, Lcom/instagram/android/mediacache/a;->c:Landroid/graphics/RectF;

    invoke-virtual {v0, p1}, Landroid/graphics/RectF;->set(Landroid/graphics/Rect;)V

    .line 32
    return-void
.end method

.method public setAlpha(I)V
    .locals 1
    .parameter "alpha"

    .prologue
    .line 51
    iget-object v0, p0, Lcom/instagram/android/mediacache/a;->b:Landroid/graphics/Paint;

    invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 52
    return-void
.end method

.method public setColorFilter(Landroid/graphics/ColorFilter;)V
    .locals 1
    .parameter "cf"

    .prologue
    .line 56
    iget-object v0, p0, Lcom/instagram/android/mediacache/a;->b:Landroid/graphics/Paint;

    invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;

    .line 57
    return-void
.end method
